package com.centit.springbootdemo04.DI;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhao_jx
 * @date 2020/7/5 17:38
 */
@Configuration
public class TestDiConfiguration {
    @Bean
    public TestB testB(){
        return new TestB();
    }

    @Bean
    public TestA testA(TestB testB){
        TestA testA= new TestA();
        testA.setTestB(testB);
        return testA;
    }
}
